home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 176-200 / scopedisk180 / arexxtutorial / more_examples / readme < prev    next >
Text File  |  1995-03-19  |  4KB  |  97 lines

  1. This archive contains a few example ARexx programs. A few of them might
  2. even be useful to you.
  3. ----------------------------------------------------------------------------
  4. Notes: These programs assume that the ARexx support library has been
  5.        opened. I open it in my startup-sequence because I use ARexx a lot.
  6.  
  7.        On my system, 'delete' is called 'del'. If it isn't called that on
  8.        your system, just change any occurences of 'del' to whatever you
  9.        call it on your system.
  10.  
  11.        Many of these programs are tools I use often. Since I don't like
  12.        typing 'rx' before them, I use WShell. I highly recommend it.
  13. ----------------------------------------------------------------------------
  14. The programs:
  15.  
  16. join.rexx
  17. ----------
  18.   The standard Amigados JOIN command has a small problem. If the output
  19. file is the same name as one of the input files, JOIN will complain, and
  20. will even wipe out that file, leaving it empty. join.rexx fixes this  by
  21. detecting whether the above condition is met, and if it is, changes the
  22. command line to make the output a file called 'arexxtempfile', calling the
  23. Amigados JOIN with it, then copying the temp file to the real output file
  24. name, and deleting the temp file.
  25.  
  26. append.rexx
  27. -----------
  28. Syntax: append a b c
  29.  
  30.   A special case of JOIN. In the above example, will JOIN files named a, b,
  31. and c. The resulting joined file will be named 'a'. It does its work by
  32. adding 'AS' and the first filename in the command line to the end of the
  33. command line and calling join.rexx
  34.  
  35. copy.rexx
  36. ---------
  37.   This was written to do a job for me. It also serves as an example of how
  38. to modify a command by placing an appropriately named file in the REXX:
  39. directory. If you are using WShell, the REXX: directory is searched before
  40. the C: directory when you type a command. If the file is found, it will be
  41. executed as an ARexx script, allowing you to do anything you want with the
  42. command line before calling the actual program. In this case, copy.rexx
  43. lets me use the '*' wildcard. it performs its function by replacing all
  44. instances of '*' with '#?'.
  45.  
  46. man.rexx
  47. --------
  48.   Similar to the Unix 'man', this allows you to have online documentation
  49. files. In my case, I have an assigned directory called 'DOCS:', and within
  50. that directory, a number of text files that end with '.doc'. This program
  51. finds the appropriate one and uses 'more' to display it. You could have it
  52. call your favourite editor, or just type the file out to the console.
  53.  
  54. plot.rexx
  55. ---------
  56.   This one is by Rick Morris of Vancouver BC. It is rather specialized, but
  57. fascinating because it shows the power of ARexx in non-trivial programs.
  58. It will accept a PCLO 'BLOCK' file, and plot it double sized on a Toshiba
  59. P351 printer (24 pin, impact, dot matrix). You can probably modify it for
  60. any other printer, though best results will be obtained with 24 pins or
  61. on a laser printer. PCLO is a printed circuit board CAD program from
  62. SoftCircuits.
  63.  
  64. touch.rexx
  65. ----------
  66.   Sets the date on a file to the current date and time. Setdate is normally
  67. used for this, and in fact is called by touch.rexx to do its thing. The
  68. difference here is that if the file does not exist, it will be created as
  69. an empty file. Handy for those programs that require a file of a certain
  70. name, but aren't smart enough to create one.
  71.  
  72. arcall.rexx
  73. -----------
  74.   A program that will ARC all files within a directory, including
  75. subdirectories.  It will rename all files to the form 'File1', 'File2',
  76. etc.  and will generate a standard Amigados script file that will be
  77. included in the .ARC file.  This script file, when executed, recreates the
  78. original file structure, creating any necessary subdirectories and renaming
  79. all files back to their original names. Written at the request of the sysop
  80. of the Panorama BBS in Vancouver BC.
  81.  
  82. ports.rexx
  83. ports2.rexx
  84. -----------
  85.   Two examples (not at all useful) of interprocess communication. To use,
  86. open a second CLI, and run 'ports' in one of them. It will print a message
  87. and wait. When you run 'ports2' in the other CLI, it will send a message to
  88. 'ports'. When 'ports' receives the message, it will print it and exit.
  89. ---------------------------------------------------------------------------
  90.  
  91. Use the code in these programs in any way you see fit. If you have examples
  92. of your own ARexx programs, I and many others would like to see them.
  93.  
  94. Larry Phillips.
  95.     Compuserve: 76703,4322
  96.  
  97.